import {apilink} from "@/api/api.js"
export let indexx = {
    state: {
        indexInfo:""
    },
    mutations: {
        xiugai(state,payload){
            state.indexInfo=payload
            console.log(state.indexInfo)
        }
        // xiugai(state){
        //     state.indexInfo=345
        //     // console.log(state.indexInfo)
        // }
    },
    actions: {
        indexinfo(context){
            apilink("/get_index","get").then((ok)=>{
                console.log(ok.data.arr)
                context.commit("xiugai",ok.data.arr)
            }).catch((err)=>{
                alert("数据读取失败")
                console.log(err)
            })

            
        }
    },
    modules: {
    }
}